/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package strategies;

import common.ParamStorage;
import html.XHtmlFormatter;
import java.util.Map;

/**
 *
 * @author Alejandro
 */
public class RequestOutputStrategy implements Strategy {

    @Override
    public void execute(WebContext ctx) {
        XHtmlFormatter provider = ctx.getWebFormatter();
        ParamStorage storage = ctx.getParamStorage();
        provider.startDiv("", "operationResult");
        provider.writeP("center", this.getClass().getName());
        Map<String, String> map = storage.getParamMap();
        for (String s: map.keySet()) {
            provider.writeP("", s + " = " + map.get(s));
        }
        provider.endDiv();
    }

}
